package com;

public class TestStringBuilder {

	public static void main(String[] args) {
		String pno34 = "898416620151000023B0000       0000";
//		System.out.println(pno34);
//		System.out.println(pno34.length());
		String ic = "039";
		StringBuilder sb = new StringBuilder(pno34);
		sb.replace(12, 15, ic);
//		System.out.println(sb.toString());
//		System.out.println(sb.length());
		int length = pno34.length();
		System.out.printf("%18s | ", "Exterior CODE : ");
		System.out.println(ic);
		System.out.printf("%18s | ", "INDEX : ");
		for(int i=0;i<length;i++) {
			System.out.printf("%2d | ", i+1);
		}
		System.out.println();
		System.out.printf("%18s | ", "Current PNO34 : ");
		for(String s : pno34.split("")) {
			System.out.printf("%2s | ", s);
		}
		System.out.println();
		System.out.printf("%18s | ", "NEW PNO34 : ");
		for(String s : sb.toString().split("")) {
			System.out.printf("%2s | ", s);
		}
		System.out.println();
//		String newpno34 =  pno34.substring(0, 12)+ic+pno34.substring(15);
//		System.out.printf("%15s | ", "NEW PNO34 : ");
//		for(String s : newpno34.split("")) {
//			System.out.printf("%2s | ", s);
//		}
		
	}

}
